﻿<phone:PhoneApplicationPage 
    x:Class="RapidRepository.TestMobileApplication.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="Rapid Repository" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="test app" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <TextBlock Width="400" TextWrapping="Wrap">
                This test application demonstrates the add, update, delete and query functionality of the 
                Rapid Repository document database.
                <LineBreak></LineBreak><LineBreak></LineBreak>
                Please use the application bar menu items to test the various operations. 
                <LineBreak></LineBreak><LineBreak></LineBreak>
                If you are testing on an emulator leave the emulator open between debugging 
                sessions, otherwise your data will not be persisted as the emulator does not have real 
                storage.
                <LineBreak></LineBreak>
                <LineBreak></LineBreak>
                Please let me know if you find any bugs with the repository.
                <LineBreak></LineBreak>
                <LineBreak></LineBreak>
                If you would like some automatic test customers added click the following button.
            </TextBlock>
            <Button Content="Load Test Data" Height="72" HorizontalAlignment="Left" Margin="102,457,0,0" Name="button1" VerticalAlignment="Top" Width="250" Click="LoadTestData" />
        </Grid>
    </Grid>
 
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBar.MenuItems>                
                <shell:ApplicationBarMenuItem Text="Add Customer" Click="AddCustomer"/>
                <shell:ApplicationBarMenuItem Text="Customer Search" Click="CustomerSearch"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>